package ${entityUrl};

import com.fasterxml.jackson.annotation.JsonFormat;
<#if isSwagger=="true" >
import io.swagger.annotations.ApiModelProperty;
</#if>
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import top.kpromise.common.base.BaseEntity;
<#list pkgs as ps>
	<#if ps??>
import ${ps};
	</#if>
</#list>

/**
* @author ${author}
* @author spring-boot-code-generator
* This file was created by spring-boot-code-generator at ${createTime}
* @see <a href="https://gitee.com/ijustyce/spring-boot-code-generator">spring-boot-code-generator</a>
*/

@Data
@EqualsAndHashCode(callSuper = false)
@Entity(name = "${table}")
<#if tableComment !=''>
@org.hibernate.annotations.Table(appliesTo = "${table}", comment = "${tableComment}")
<#else>
@org.hibernate.annotations.Table(appliesTo = "${table}")
</#if>
@Table(name = "${table}")
public class ${entityName}Entity extends BaseEntity implements Serializable {

	private static final long serialVersionUID = ${agile}L;
	
<#list cis as ci>
 <#if ci.javaType=="Date">
  <#if ci.jdbcType=="date">
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  <#elseif ci.jdbcType=="time">
    @DateTimeFormat(pattern = "HH:mm:ss")
	@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
  <#else>
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  </#if>
 </#if>
 <#if isSwagger=="true" >
 <#if ci.comment!="" >
	@ApiModelProperty(name = "${ci.property}", value = "${ci.comment}")
 <#else>
	@ApiModelProperty(name = "${ci.property}")
 </#if>
 </#if>
<#if ci.columnKey=="pri" >
	@Id
</#if>
<#if ci.maxLength ==0>
<#if ci.comment!="" >
	@Column(columnDefinition = "${ci.jdbcType} comment '${ci.comment}'")
<#else>
    @Column(columnDefinition = "${ci.jdbcType}")
</#if>
<#else>
<#if ci.comment!="" >
	@Column(columnDefinition = "${ci.jdbcType}(${ci.maxLength}) comment '${ci.comment}'")
<#else>
	@Column(columnDefinition = "${ci.jdbcType}(${ci.maxLength})")
</#if>
</#if>
	private ${ci.javaType} ${ci.property};

</#list>
}